home *** CD-ROM | disk | FTP | other *** search
- # Sample file demonstrating the mapping of an image onto a box
- # Polyray input file: Alexander Enzmann
-
- viewpoint {
- from <0,3,-10>
- at <0,0,5>
- up <0,1,0>
- angle 45
- resolution 160, 160
- }
-
- # Get various surface finishes
- include "colors.inc"
-
- # Set up background color & lights
- background <0, 0, 0>
- light white, <10, 5, -50>
-
- # Pull in a Targa file
- define ball_image image("m22u.tga")
- define box_image_texture
- texture {
- special surface {
- color planar_imagemap(ball_image, P, 1)
- ambient 0.2
- diffuse 0.8
- }
- }
-
- define ball_image_texture
- texture {
- special surface {
- color spherical_imagemap(ball_image, P)
- ambient 0.2
- diffuse 0.8
- }
- }
-
- define basic_box
- object {
- box <-2, 0, -2>, <2, 1, 2>
- }
- basic_box {
- box_image_texture { scale <2, 1, 2> }
- rotate <-30, 30, 0>
- }
-
- object {
- sphere <0, 0, 0>, 1
- ball_image_texture
- rotate <30, 45, 0>
- translate <0, 3, 0>
- }
-
- # Create a ground plane
- object {
- polynomial y + 0.01
- texture { checker matte_white, matte_black }
- scale <10, 10, 10>
- translate <0,-0.01,0>
- }
-